<template>
  <div class="app-container">
    <!--工具栏-->
    <div class="head-container">
      <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
        <el-tab-pane label="未分配" name="first">
          <homeWapprove ref="homeWapprove" />
        </el-tab-pane>
        <el-tab-pane label="已分配" name="second">
          <homeYapprove ref="homeYapprove" />
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import homeWapprove from '../zhsq/homeWapprove'
import homeYapprove from '../zhsq/homeYapprove'
export default {
  components: { homeWapprove, homeYapprove },
  data() {
    return {
      activeName: 'first',
      tabDialog: false,
      bisHljgId: ''
    }
  },
  methods: {
    handleClick(tab, event) {
      const name = tab.name
      console.log('------------------' + name)
      if (name === 'first') {
        console.log('12222222222222222')
        this.$refs.homeWapprove.crud.toQuery()
        console.log('32222222222222222')
      } else if (name === 'second') {
        console.log('22222222222222222')
        this.$refs.homeYapprove.approveDialog = true
        this.$refs.homeYapprove.crud.toQuery()
      }
    }
  }
}
</script>

<style scoped>

</style>
